package com.example.bcscb.api;


import com.example.bcscb.service.BaseService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 1
 *
 * @author zsw
 * @date 2024/03/08
 */
@RestController
@RequestMapping("/api")
public class SystemApi {

    @Resource
    private BaseService baseService;

    @Transactional(rollbackFor = Exception.class)
    @PostMapping("/test")
    public Object test() {
        baseService.test();
        throw new NullPointerException();
//        return "OK";
    }
}
